const express = require('express');
const router = express.Router();
const passport = require('passport');

// 假设有授权器
const authorizationController = require('../controllers/oauthController');

// 授权端点
router.get('/authorize', authorizationController.authorize);
router.post('/authorize', authorizationController.decide);
router.post('/token', passport.authenticate(['basic', 'oauth2-client-password'], { session: false }), authorizationController.token);

module.exports = router;
